<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>JSF-AJAX-Beispiel</title>
        <h:outputStylesheet library="css" name="styles.css"/>
    </h:head>
    <h:body>
        <ui:composition template="WEB-INF/template/master.xhtml">
            <ui:define name="content">
                <h1>JSF-AJAX-Beispiel</h1>
                <h:form>
                    <!--                    <h:panelGrid columns="1">-->
                    <h3>Fade</h3>
                    <p:imageSwitch effect="fade">
                        <ui:repeat value="#{imageSwitchBean.images}" var="image">
                            <p:graphicImage value="/resources/images/#{image}" />
                        </ui:repeat>
                    </p:imageSwitch>
                    <h3>Zoom</h3>
                    <p:imageSwitch effect="zoom">
                        <ui:repeat value="#{imageSwitchBean.images}" var="image">
                            <p:graphicImage value="/resources/images/#{image}" />
                        </ui:repeat>
                    </p:imageSwitch>
                    <h3>TurnDown</h3>
                    <p:imageSwitch effect="turnDown">
                        <ui:repeat value="#{imageSwitchBean.images}" var="image">
                            <p:graphicImage value="/resources/images/#{image}" />
                        </ui:repeat>
                    </p:imageSwitch>

                    <h3>Shuffle</h3>
                    <p:imageSwitch effect="shuffle">
                        <ui:repeat value="#{imageSwitchBean.images}" var="image">
                            <p:graphicImage value="/resources/images/#{image}" />
                        </ui:repeat>
                    </p:imageSwitch>

                    <h3>Wipe with Manual Controls</h3>
                    <p:commandButton type="button" onclick="switcher.previous();"
                                     image="ui-icon ui-icon-circle-triangle-w"/>
                    <p:commandButton type="button" onclick="switcher.next();"
                                     image="ui-icon ui-icon-circle-triangle-e"/>

                    <p:imageSwitch effect="wipe" widgetVar="switcher" slideshowAuto="false">
                        <ui:repeat value="#{imageSwitchBean.images}" var="image">
                            <p:graphicImage value="/resources/images/#{image}" />
                        </ui:repeat>
                    </p:imageSwitch>

                    <h3>Dialog Integration</h3>
                    <p:commandButton type="button" value="Show" onclick="dialog.show()" />

                    <p:dialog header="Images" widgetVar="dialog" modal="true" draggable="false" resizable="false"
                              width="425" height="300">

                        <p:imageSwitch effect="fade">
                            <ui:repeat value="#{imageSwitchBean.images}" var="image">
                                <p:graphicImage value="/resources/images/#{image}" />
                            </ui:repeat>
                        </p:imageSwitch>
                    </p:dialog>
                    <!--                    </h:panelGrid>-->
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
